fix/3708 test failure#3709
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughBump Playwright CI PHP matrix from 7.3→7.4, change a secondary checkout ref from ChangesCI and E2E Test Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Pull request artifacts
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
e2e/tests/block-editor.spec.ts (1)
108-120: ⚡ Quick winConsider extracting duplicate block configuration logic.
The code at lines 108-120 duplicates the block setup logic from lines 69-81 (opening Settings, filling text, setting color, closing color picker). Extracting this into a shared helper function would improve maintainability and ensure consistency.
♻️ Example helper function
async function configureTextBlock( editor: Editor, page: Page, text: string, hexColor: string ) { const settings = page.getByLabel('Settings', { exact: true }) if (await settings.getAttribute('aria-pressed') === 'false') { await settings.click() } await editor.canvas .locator('[data-type="stackable/text"] > .stk-block-text > p[role="textbox"]') .fill(text) await page .locator('.stk-color-palette-control .stk-control-content > .components-dropdown > .components-button') .first() .click() await page.getByLabel('Hex color').fill(hexColor) await editor.canvas.locator('body').click() }Then both tests could call:
await configureTextBlock(editor, page, 'test', 'ff0000')🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@e2e/tests/block-editor.spec.ts` around lines 108 - 120, Duplicate block setup (opening Settings, filling text, setting color, closing color picker) should be extracted into a shared helper; add a function named configureTextBlock(editor: Editor, page: Page, text: string, hexColor: string) that performs the existing steps (toggle Settings if aria-pressed is 'false', fill the textbox at the selector '[data-type="stackable/text"] > .stk-block-text > p[role="textbox"]', open the color dropdown via '.stk-color-palette-control .stk-control-content > .components-dropdown > .components-button' .first(), fill the 'Hex color' input, and click 'body' on editor.canvas to close the picker), then replace the duplicated blocks in the spec with await configureTextBlock(editor, page, 'test', 'ff0000'); ensure the helper is exported/available in the test file and include any necessary Editor/Page type imports.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@e2e/tests/block-editor.spec.ts`:
- Around line 108-120: Duplicate block setup (opening Settings, filling text,
setting color, closing color picker) should be extracted into a shared helper;
add a function named configureTextBlock(editor: Editor, page: Page, text:
string, hexColor: string) that performs the existing steps (toggle Settings if
aria-pressed is 'false', fill the textbox at the selector
'[data-type="stackable/text"] > .stk-block-text > p[role="textbox"]', open the
color dropdown via '.stk-color-palette-control .stk-control-content >
.components-dropdown > .components-button' .first(), fill the 'Hex color' input,
and click 'body' on editor.canvas to close the picker), then replace the
duplicated blocks in the spec with await configureTextBlock(editor, page,
'test', 'ff0000'); ensure the helper is exported/available in the test file and
include any necessary Editor/Page type imports.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: df1f660c-5634-481d-bf5a-c43596c33419
📒 Files selected for processing (2)
.github/workflows/playwright.ymle2e/tests/block-editor.spec.ts
fixes #3708
build:no-translatescript). The fix is to use the updateddevelopbranch instead.Summary by CodeRabbit
Tests
Chores